package com.lvxingli.generateannotation.config.localization;

import com.lvxingli.generateannotation.config.settings.state.GlobalSettingsStateHelper;
import com.lvxingli.generateannotation.constants.LocalizationEnum;

/**
 * @author lvxingli
 */
public final class LocalizationConfigFactory {

    private LocalizationConfigFactory() {
    }

    private static GlobalSettingsStateHelper globalSettingsState() {
        return GlobalSettingsStateHelper.getInstance();
    }

    public static GlobalSettingLocalizationConfig config() {
        return new GlobalSettingLocalizationConfig();
    }

    public static String name(LocalizationEnum localizationEnum) {
        switch (globalSettingsState().getLanguage()) {
            case ENGLISH -> {
                return localizationEnum.getEnglish();
            }
            case CHINESE -> {
                return localizationEnum.getChinese();
            }
            default -> {
                return localizationEnum.getEnglish();
            }
        }

    }
}
